﻿@{
   Layout=null;
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>登录 - SignalR.Web</title>
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
</head>
<body>
    <header>
        <div class="container-fluid">
        </div>
    </header>
    <div class="container">
        <div class="text-center">
            <h5 class="display-4">登 录</h5>

		</div>

		<div class="form-horizontal" role="form">
			<div class="form-group">
				<label for="firstname" class="col-sm-2 control-label">账 号:</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" id="account"  placeholder="请输入账号">
				</div>
			</div>
			<div class="form-group">
				<label for="lastname" class="col-sm-2 control-label">密 码:</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" id="pwd"  placeholder="请输密码">
				</div>
			</div>

			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<a class="btn btn-primary">登录</a>
				</div>
			</div>
		</div>
    </div>

    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script> 
	<script>
		$(function () {
			$(".btn").click(function () {
				var postFrom = { 
					account: $("#account").val(),
					pwd: $("#pwd").val()
				};
				// 通用方式
				$.ajax({
					url: '/Login/Account',
					type: 'POST',
					data: postFrom,
					async: true,
					success: function (data) {
						//console.log(data);
						//console.log(data.msg); 
						window.location.href = "/Home";
					},
					error: function () { }
				});
			});
		});
       

	</script>
</body>
</html>
